package com.bestcem.xm.member.service;

import com.bestcem.xm.common.core.domain.web.ServiceResult;
import com.bestcem.xm.common.core.domain.web.XmResultJson;
import com.bestcem.xm.member.controller.dto.HttpRecordProgressDTO;
import com.bestcem.xm.member.controller.v2.param.DownloadMemberQuery;
import com.bestcem.xm.member.grpc.service.param.export.*;
import com.bestcem.xm.member.service.dto.ExportRecordDTO;
import com.bestcem.xm.member.service.dto.PageDTO;

import java.util.List;

/**
 * @author ming.xue <ming.xue@idiaoyan.com>
 * @desc 导出服务
 * @date 2021-07-24
 */
public interface ExportService {
    /**
     * 导出联系人(gRPC)
     *
     * @param param
     * @return
     */
    ServiceResult<String> exportMember(ExportMemberParam param);

    /**
     * 出联系人(Http)
     *
     * @param query
     * @return
     */
    XmResultJson exportMember(DownloadMemberQuery query);

    /**
     * 分页查询导出记录
     * @param param 查询参数
     * @author dc.wang <dc.wang@idiaoyan.com>
     * @date 2021/7/29
     */
    ServiceResult<PageDTO<ExportRecordDTO>> listExportRecords(ListExportRecordsParam param);

    /**
     * 单个查询导出记录
     * @param param 查询参数
     * @author dc.wang <dc.wang@idiaoyan.com>
     * @date 2021/7/29
     */
    ServiceResult<ExportRecordDTO> getExportRecord(GetExportRecordParam param);

    /**
     * 批量删除导出记录
     * @param param 请求参数
     * @author dc.wang <dc.wang@idiaoyan.com>
     * @date 2021/7/30
     */
    ServiceResult<Integer> batchDeleteExportRecords(BatchDeleteExportRecordsParam param);

    /**
     * 查询导出进度
     * @param param 请求参数
     * @author dc.wang <dc.wang@idiaoyan.com>
     * @date 2021/7/30
     */
    ServiceResult<Float> getExportProgress(GetExportProgressParam param);

    ServiceResult<HttpRecordProgressDTO> getExportProgress(List<String> id, String orgId);
}
